package cn.edu.ren.service.imp;

import cn.edu.ren.dao.IStudentDao;
import cn.edu.ren.entity.Student;
import cn.edu.ren.service.IStudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Collection;

/**
 * @PackageName: cn.edu.ren.service.imp
 * @ClassName: StudentServiceImp
 * @Description:
 * @author: RZS
 * @date: 2021/6/16  23:55
 */
@Service
public class StudentServiceImp implements IStudentService {

    @Autowired
    private IStudentDao studentDao;

    @Override
    public void insert(Student student) {
        studentDao.insert(student);
    }

    @Override
    public Collection<Student> selectAll() {
        return studentDao.selectAll();
    }

    @Override
    public Student selectById(Integer id) {
        return studentDao.selectById(id);
    }

    @Override
    public void deleteById(Integer id) {
        studentDao.deleteById(id);
    }

    @Override
    public void updateById(Student student, Integer id) {
        studentDao.updateById(student, id);
    }
}
